package com.fourth.util.exception;


import com.fourth.enums.ResultCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 邓建波
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BusinessException extends RuntimeException{
    protected Integer code;
    protected String message;

    public BusinessException(ResultCode resultCode){
        this.code = resultCode.getCode();
        this.message = resultCode.getMsg();
    }
}
